This invention relates to a method of driving a stepping motor and a drive circuit thereof.
It is known that a printing wheel of a wheel printer is driven by a stepping motor. In this case, for example, a memory in which the acceleration and deceleration patterns of the stepping motor are stored is used. A central processing unit (CPU) designates the address location of the memory, in which the acceleration pattern is stored, in accordance with step amount data indicative of the number of rotational steps specified by the key operation, and the CPU reads out from this memory step timing data representative of the step timings which gradually become faster. The step timing data read out from this memory is input to a programmable timer, which generates step timing signal when the period corresponding to this step timing data has elapsed. The CPU drives a stepping motor drive circuit synchronously with the step timing signal to drive the stepping motor by one step. Thereafter, when the step timing data reaches a predetermined value, namely, when the step driving frequency of the stepping motor reaches a predetermined value, the stepping motor is driven step by step in accordance with this predetermined step driving frequency. In this case, the stepping motor is diven on the basis of this predetermined step driving frequency, that is, at a constant rotational speed until the number of residual rotational steps to be driven reaches a preset value. Thereafter, when the number of residual rotational steps reaches the preset value, the CPU reads out the step timing data indicative of the deceleration pattern from the memory, thereby step-driving the motor on the basis of this step timing data while reducing the step driving frequency. In this way, the stepping motor is step-driven at a gradually decreasing speed, and is stopped when it is driven by the number of rotational steps which has been originally specified.
The driving method will be described with reference to FIG. 1, in the case where the stepping motor is step-driven by the predetermined number of rotational steps N1, N2 and N3 (N1&gt;N2&gt;N3) selected by the key input.
When the motor is step-driven by the predetermined number of rotational steps N1, the rotational speed gradually increases along the acceleration pattern A-B-C. After the step driving frequency reaches the predetermined value F1, the stepping motor is driven on the basis of this step driving frequency F1 until the number of residual rotational steps to be driven reaches N. When the number of residual rotational steps reaches N, the stepping motor is step-driven at such a rate that the rotational speed gradually decreases along the deceleration pattern D-E.
When the number of rotational steps is set to N2 or N3, the motor is step-driven at such a rate that the rotational speed gradually increases along the acceleration pattern A-B-C or A-B until the number of rotational steps becomes, for example, N2/2 or N3/2. Thereafter, the motor is step-driven at such a rate that the rotational speed gradually decreases along the deceleration pattern C-F or B-G.
In the case of such a prior-art stepping motor driving method, the stepping motor is always step-driven on the basis of the same acceleration and deceleration patterns irrespective of the number of rotational steps to be driven; therefore, it is difficult to smoothly drive the stepping motor. Particularly, in the case where the number of rotational steps is a small value, overshoot or the like may easily occur and it is difficult to accurately drive the motor.